﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCMS.Model;

namespace SCMS.CoreBusinessLogic.SalaryPayment
{
    public interface ISalaryPaymentService
    {
        bool SaveSalaryReqst(Model.SalaryBudgetline SPBLEntity, Model.SalaryRequest SPEntity);
        string GenerateUniquNumber(CountryProgramme cp);
        List<SalaryBudgetline> GetSPBLines(Guid SalaryId);
        List<SalaryRequest> GetSalaryPayments(Guid CPId);
        List<PayrollItem> GetPayrollItems(Guid CPid);
        List<SalaryRequest> GetSalaryPaymentsForReview(SystemUser currentUser);
        List<SalaryRequest> GetSalaryPaymentsForAuth(SystemUser currentUser);
        List<SalaryRequest> GetSalaryPaymentsForPosting(Guid countryProgId, SystemUser currentUser);
        SalaryRequest GetSalaryRequestById(Guid Id);
        SalaryBudgetline GetSalaryBudgetLineById(Guid Id);
        bool SaveSalaryRequest(SalaryRequest spm);
        bool SaveSalaryBudgetLine(SalaryBudgetline sbl);
        bool CommitFunds(SalaryRequest spm);
        bool EffectPosting(SalaryRequest spm, Staff poster);
        // <summary>
        /// Send notification to requestor and project managers of the affected budget lines
        /// </summary>
        /// <param name="rfa"></param>
        void NotifyAffected(SalaryRequest spm);

        void DeleteSPMBudgetLineById(Guid Id);
        void DeleteSPMById(Guid Id);
        List<BudgetCheckResult> RunFundsAvailableCheck(Guid spmId);
    }
}
